<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/9/30
  Time: 21:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
    <title>Title</title>
</head>
<body>

<div class="form-group">
    <label class="col-sm-2 control-label">科室</label>
    <div class="col-sm-7">
        <select class="form-control" id="first" name="firstdep" onchange="changedep(this)">
            <option value="-1">===请选择科室===</option>
            <c:forEach items="${firstdep}" var="fdep">
                <c:choose>
                    <c:when test="${fristId==fdep.id}">
                        <option value="${fdep.id}" selected>${fdep.deptName}</option>
                    </c:when>
                    <c:otherwise>
                        <option value="${fdep.id}">${fdep.deptName}</option>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </select>
    </div>
        <div class="col-sm-3">
           <span id="spanOne" style="color: red"></span>
        </div>
</div>
<div class="form-group">
    <label  class="col-sm-2 control-label">科室</label>
    <div class="col-sm-7">
        <select class="form-control" id="second" name="seconddep" onchange="changesdep(this)">
            <option value="-1">===请选择二级科室===</option>
            <c:forEach items="${seconddep}" var="sdep">
                <c:choose>
                    <c:when test="${secondId==sdep.id}">
                        <option value="${sdep.id}" selected >${sdep.sdeptName}</option>
                    </c:when>
                    <c:otherwise>
                        <option value="${sdep.id}" >${sdep.sdeptName}</option>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </select>
    </div>
        <div class="col-sm-3">
            <span id="spanTwo" style="color: red"></span>
        </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">医生</label>
    <div class="col-sm-7">
        <select class="form-control" name="doctor" id="doctor" onchange="changedoc(this)">
            <option value="-1">===请选择医生===</option>
            <c:forEach items="${docList}" var="doc">
               <c:choose>
                   <c:when test="${doctorId==doc.id}">
                       <option value="${doc.id}" selected >${doc.docName}</option>
                   </c:when>
                   <c:otherwise>
                       <option value="${doc.id}" >${doc.docName}</option>
                   </c:otherwise>
               </c:choose>
           </c:forEach>
        </select>
    </div>

        <div class="col-sm-3">
            <span id="spanThree" style="color: red"></span>
        </div>

</div>
<div class="form-group">
    <label  class="col-sm-2 control-label">就医时间段</label>
    <div class="col-sm-7">
        <select class="form-control" name="time" id="time">
            <option value="-1">===请选择就诊时间===</option>
            <c:forEach items="${timeList}" var="t">
                <c:choose>
                    <c:when test="${tid==t.id}">
                        <option value="${t.id}" selected >${t.startTimes}--${t.endTime}</option>
                    </c:when>
                    <c:otherwise>
                        <option value="${t.id}" >${t.startTimes}--${t.endTime}</option>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </select>
    </div>
        <div class="col-sm-3">
            <span id="spanFour" style="color: red"></span>
        </div>

</div>
<c:if test="${!empty price}">
    <div class="form-group">
        <label class="col-sm-2 control-label">价格</label>
        <div class="col-sm-7" >
            <h3>${price}元</h3>
            <input type="hidden" name="amt" value="${price}">
        </div>
    </div>
</c:if>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-7">
        <button type="submit" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
            <span class="glyphicon glyphicon-user"></span> 预约挂号!
        </button>

        <!-- 弹出支付框 -->
    </div>
</div>
</body>
</html>
